<div class="cbb">
  <div id="capt" style="height:18px; border-bottom: 1px dashed #888888; font-size:12px; font-weight:bold; margin-bottom: 0px">Последние изменения в расписании</div>
  <div class="scrollLeft"></div>
  <div class="scrollRightContainer">
    <div class="scrollRight">
      <div class="scrollRight2"></div>
      <div class="scrollCenterContainer">
        <div class="scrollCenter">
          <div class="scrollList">
            <ul class="scrollList">
<?php
  $connection=mysql_connect("127.0.0.1","avtovokzal","pipzemkam") or die("Ошибка соединения с сервером");
  $db=mysql_select_db("avtovokzal",$connection) or die("Ошибка при выборе базы данных");
  @mysql_query('set character_set_client="utf8"');
  @mysql_query('set character_set_results="utf8"');
  @mysql_query('set collation_connection="utf8_general_ci"');
  $row=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM `changes`"));
  echo '<input type="hidden" id="changes_count" value="'.$row[0].'">';
  $result=mysql_query("SELECT * FROM `changes` ORDER BY `datetime` DESC LIMIT 0,5");
  $i=1;
  while ($row=mysql_fetch_array($result,MYSQL_ASSOC)) {
    if ($row["status"]!='off') {
      echo '<li id="li'.$i.'">';
      echo '<h3>'.$row["title"].'</h3><p>'.$row["shorttext"].'</p>';                              
      echo '<div style="float: left; margin-left: 14px; font-size: 10px; width: 120px"><strong><i>'.substr($row["datetime"],8,2).'.'.substr($row["datetime"],5,2).'.'.substr($row["datetime"],0,4).'</i></strong></div>';
      echo '<a href="#" onclick="showchange('.$row["id"].');" class="more"><i>Подробнее...</i></a>';
      echo '</li>';
      $i++;
    }  
  }
  mysql_close($connection);
?>
            </ul>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div style="clear: both; height: 0"></div>
</div>